{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 24,
   "metadata": {},
   "outputs": [],
   "source": [
    "import tensorflow as tf"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "metadata": {},
   "outputs": [],
   "source": [
    "import matplotlib.pyplot as plt\n",
    "import numpy as np"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "metadata": {},
   "outputs": [],
   "source": [
    "(train_images, train_labels), (test_images, test_labels) = tf.keras.datasets.fashion_mnist.load_data()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(60000, 28, 28)"
      ]
     },
     "execution_count": 27,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_images.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(60000,)"
      ]
     },
     "execution_count": 28,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_labels.shape"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 29,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 将训练图片扩张成四个维度，数量、长、宽、通道\n",
    "train_images = np.expand_dims(train_images, -1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 30,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(60000, 28, 28, 1)"
      ]
     },
     "execution_count": 30,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "train_images.shape # 黑白图片"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "metadata": {},
   "outputs": [],
   "source": [
    "model = tf.keras.Sequential()\n",
    "# 可以设置padding=‘same’，默认移动步长是（1,1）\n",
    "model.add(tf.keras.layers.Conv2D(32, (3, 3), \n",
    "                                 input_shape=train_images.shape[1:],\n",
    "                                activation='relu'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.add(tf.keras.layers.MaxPool2D()) # 默认尺寸是（2,2）"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 33,
   "metadata": {},
   "outputs": [],
   "source": [
    "# 注意卷积核数量的选取\n",
    "model.add(tf.keras.layers.Conv2D(64, (3, 3), \n",
    "                                activation='relu'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "metadata": {},
   "outputs": [],
   "source": [
    "# Dense层接受二维的数据,先添加一个全局池化\n",
    "model.add(tf.keras.layers.GlobalAveragePooling2D())"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.add(tf.keras.layers.Dense(10, activation='softmax'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 36,
   "metadata": {},
   "outputs": [],
   "source": [
    "model.compile(optimizer='adam', \n",
    "              loss='sparse_categorical_crossentropy',\n",
    "             metrics=['acc'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 42,
   "metadata": {},
   "outputs": [],
   "source": [
    "test_images = np.expand_dims(test_images, -1) # 测试数据也需要扩张维度"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Train on 60000 samples, validate on 10000 samples\n",
      "Epoch 1/5\n",
      "60000/60000 [==============================] - 61s 1ms/sample - loss: 0.7507 - acc: 0.7494 - val_loss: 0.5865 - val_acc: 0.7865\n",
      "Epoch 2/5\n",
      "60000/60000 [==============================] - 58s 970us/sample - loss: 0.4690 - acc: 0.8364 - val_loss: 0.4422 - val_acc: 0.8509\n",
      "Epoch 3/5\n",
      "60000/60000 [==============================] - 55s 921us/sample - loss: 0.4146 - acc: 0.8541 - val_loss: 0.4225 - val_acc: 0.8526\n",
      "Epoch 4/5\n",
      "60000/60000 [==============================] - 63s 1ms/sample - loss: 0.3806 - acc: 0.8665 - val_loss: 0.4027 - val_acc: 0.8610\n",
      "Epoch 5/5\n",
      "60000/60000 [==============================] - 75s 1ms/sample - loss: 0.3588 - acc: 0.8721 - val_loss: 0.3887 - val_acc: 0.8634\n"
     ]
    }
   ],
   "source": [
    "history = model.fit(train_images, train_labels, epochs=5,\n",
    "                   validation_data=(test_images, test_labels))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "dict_keys(['loss', 'acc', 'val_loss', 'val_acc'])"
      ]
     },
     "execution_count": 44,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "history.history.keys()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[<matplotlib.lines.Line2D at 0x16543888>]"
      ]
     },
     "execution_count": 46,
     "metadata": {},
     "output_type": "execute_result"
    },
    {
     "data": {
      "image/png": "iVBORw0KGgoAAAANSUhEUgAAAXoAAAD4CAYAAADiry33AAAABHNCSVQICAgIfAhkiAAAAAlwSFlzAAALEgAACxIB0t1+/AAAADh0RVh0U29mdHdhcmUAbWF0cGxvdGxpYiB2ZXJzaW9uMy4xLjEsIGh0dHA6Ly9tYXRwbG90bGliLm9yZy8QZhcZAAAgAElEQVR4nO3deXyU9bn38c+VfSErSVgSIEDYcYOICi6IUtFW0apPtVWP1tb2tNpTba3aY/tYn3OOWlvtoqetbe1iz6m1qJW2IOKCtoBKEFAJARNASFiyQDayZ67nj5nAzRBgIDNzT2au9+uVV2bmvmd+V26Yb+785jfXiKpijDEmesW5XYAxxpjQsqA3xpgoZ0FvjDFRzoLeGGOinAW9McZEuQS3C/CXl5enxcXFbpdhjDGDytq1a+tVNb+/bREX9MXFxZSVlbldhjHGDCoi8vHRttnUjTHGRDkLemOMiXIW9MYYE+Us6I0xJspZ0BtjTJSzoDfGmChnQW+MMVEu4tbRG2NMLPB4lPoDndTsb2dXYwc1jW2kJyfwubPGBH0sC3pjjAmBzp5edjd2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z/B4xr8czCBLFVAAAAAElFTkSuQmCC\n",
      "text/plain": [
       "<Figure size 432x288 with 1 Axes>"
      ]
     },
     "metadata": {
      "needs_background": "light"
     },
     "output_type": "display_data"
    }
   ],
   "source": [
    "plt.plot(history.epoch, history.history.get('acc'), label='acc')\n",
    "plt.plot(history.epoch, history.history.get('val_acc'), label='val_cc')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.7.4"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 2
}
